home *** CD-ROM | disk | FTP | other *** search
-
- #we want a patch where positive X is ascending time, and have
-
- set length 10
- set height 2.56
- set depth 3.84
- set text(color) "1 1 1"
- set text(fontName) Helvetica
- set text(size) 18
- set dataSlice(yRotate) 180
- set dataSlice(zRotate) 270
- set time 0
- set duration [expr {1./60}]
-
- animatable: {set dataSlice(origin) [expr {-1 * $time}]}
- animatable: {set dataSlice(xTranslate) [expr {-1 * $height}]}
- set dataSlice(yTranslate) 0
- animatable: {set dataSlice(zTranslate) [expr {-1 * $depth}]}
-
- loadControlPanel controls.nib
-
- startShape gridWorld
- startShape floor
- MakeTexture $modelPath/grid.tiff /tmp/grid.tx clamp clamp box 2 2
- Surface paintedplastic texturename /tmp/grid.tx
- animatable: {Patch bilinear P "0 0 0 \
- 0 0 $depth \
- $length 0 0 \
- $length 0 $depth"}
- startShape ticks
- Surface constant
- for {set i 0} {$i <= $length} {incr i} \
- { startShape tick.${i}
- Translate $i 0 0;
- Color $text(color)
- WW3DText $text(fontName) $text(size) $i;
- endShape
- }
- endShape
- endShape
- startShape dataSlice
- Declare mapname string
- MakeTexture $modelPath/dataSlice.tiff /tmp/dataSlice.tx clamp clamp box 2 2
- # I'm putting this in an animatable: so that it doesn't get applied directly to
- # the shape. I could also flip the bit in the parser by
- # doing a "applyShadersDirectlyToCurrentShape 0"...
- animatable: {Surface WWAlphaPaintedPlastic mapname /tmp/dataSlice.tx}
- Color $text(color)
- TransformBegin
- animatable: {Rotate $dataSlice(yRotate) 0 1 0}
- animatable: {Rotate $dataSlice(zRotate) 0 0 1}
- animatable: {Translate $dataSlice(xTranslate) $dataSlice(yTranslate) $dataSlice(zTranslate)}
- animatable: {Translate 0 $dataSlice(origin) 0 }
- animatable: {Patch bilinear P "0 0 0 \
- 0 0 $depth \
- $height 0 0 \
- $height 0 $depth"}
- animatable: {Translate 0 [expr {-1 * $duration}] 0}
- # note that we've already made this texture above...
- # I'm putting this in an animatable: so that it doesn't get applied directly to
- # the shape. I could also flip the bit in the parser by
- # doing a "applyShadersDirectlyToCurrentShape 0"...
- animatable: {Surface paintedplastic texturename /tmp/grid.tx}
- animatable: {Patch bilinear P "0 0 0 \
- 0 0 $depth \
- $height 0 0 \
- $height 0 $depth"}
- TransformEnd
- Color .7 .7 .7
- animatable: {Surface screen}
- animatable: {Translate $time 0 0}
- animatable: {Patch bilinear P "0 0 0 \
- 0 $height 0 \
- $duration 0 0 \
- $duration $height 0"}
- animatable: {Patch bilinear P "0 $height 0 \
- 0 $height $depth \
- $duration $height 0 \
- $duration $height $depth"}
- animatable: {Patch bilinear P "0 0 $depth \
- 0 $height $depth \
- $duration 0 $depth \
- $duration $height $depth"}
- endShape
- endShape
-